package com.project2.mapper;

import com.project2.bean.po.MarketGoods;
import com.project2.bean.po.MarketGoodsExample;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface MarketGoodsMapper {
    long countByExample(MarketGoodsExample example);

    int deleteByExample(MarketGoodsExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketGoods record);

    int insertSelective(MarketGoods record);

    List<MarketGoods> selectByExampleWithBLOBs(MarketGoodsExample example);

    List<MarketGoods> selectByExample(MarketGoodsExample example);

    MarketGoods selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketGoods record, @Param("example") MarketGoodsExample example);

    int updateByExampleWithBLOBs(@Param("record") MarketGoods record, @Param("example") MarketGoodsExample example);

    int updateByExample(@Param("record") MarketGoods record, @Param("example") MarketGoodsExample example);

    int updateByPrimaryKeySelective(MarketGoods record);

    int updateByPrimaryKeyWithBLOBs(MarketGoods record);

    int updateByPrimaryKey(MarketGoods record);

//    int insertGoods(@Param("goods") MarketGoods goods);

    int selectGoods(@Param("name") String name);

    int selectCategoryIdByGoodsId(Integer id);

    int selectBrandIdByGoodsId(Integer id);

    int updateByGoodsId(@Param("goodsId") Integer goodsId, @Param("date") Date date);

    List<MarketGoods> selectGoodsByCategoryId(Integer categoryId);

    List<MarketGoods> selectGoodsbYBrandId(Integer brandId);

    List<Integer> selectCategoryIdByBrandId(Integer brandId);
}
